#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QDebug>

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    // 实例化构造函数
    driverThread = new DriverThread(this);
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::on_speedSlider_valueChanged(int value)
{
    driverThread->setDriverValue(value);
    driverThread->start();
    qDebug()<<"value:"<<value<<Qt::endl;
}



